import type { userData } from './../type/login.d';
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useInfoStore = defineStore('info', () => {
  const userInfo = ref<userData|undefined>()
  
  const setInfo=(Info:userData)=>{
    userInfo.value=Info
  }
  const getInfo=():userData| undefined =>{
    return userInfo.value
  }
  const clearinfo=()=>{
    userInfo.value=undefined
  }
  return { userInfo,setInfo,getInfo,clearinfo }
})
